<div class="gi-bulletin-board">
  <div class="header">
    <div class="title p-4">
      <span class="text-gray h3">信息公告栏</span>
    </div>
    <div class="search p-4">
      <div class="gi-bulletin-board-search">
        <button pButton *ngIf="!isOperateState" pRipple type="button" label="批量操作" class="p-button-danger" (click)="operate(1)"></button>
        <div *ngIf="isOperateState">
          <button pButton pRipple type="button" label="全选" class="p-button-danger" (click)="selectAll()"></button>
          <button pButton pRipple type="button" label="删除" class="p-button-danger" (click)="delete()"></button>
          <button pButton pRipple type="button" label="关闭操作" class="p-button-danger" (click)="operate(0)"></button>
        </div>
      </div>
    </div>
  </div>
  <div class="content">
    <div class="list">
      <p-scrollPanel [style]="{width: '100%', height: '74vh'}">
        <div class="gi-bulletin-board-item" *ngFor="let item of itemData" >
          <div class="gi-bulletin-board-item-title">
            <div style="margin-bottom: 30px">
              <p-checkbox #checkbox *ngIf="isOperateState" [(ngModel)]="item.checked" (click)="selectItem(checkbox, item)" value="1" inputId="ny"></p-checkbox>
            </div>
            <h2>{{item.num}}{{item.checked}}</h2><br>
            <div class="gi-bulletin-board-content" (click)="detailClick(item)">
              <p>{{item.title}}</p>
              <p>最近编辑时间：{{item.time}}</p>
            </div>
          </div>
        </div>
      </p-scrollPanel>
    </div>
  </div>
  <div class="pagination">
    <app-pagination [option]="PageOption" (clickEvent)="PageEvent($event)"></app-pagination>
  </div>
  <p-dialog header="详细信息" [(visible)]="showDetailDialog" [style]="{width: '800px'}">
    <div class="ui-g ui-md ui-fiuld">
      <div class="ui-g-12 ui-md-12 center">
          <h2>{{detailData.title}}</h2>
      </div>
      <div class="ui-g-12 ui-md-12"></div>
      <div class="ui-g-12 ui-md-12 center">
          <span>{{detailData.content}}</span>
      </div>
      <div class="ui-g-12 ui-md-12"></div>
      <div class="ui-g-12 ui-md-12 center">
        <span>附件：</span>
        <div class=" dialog-input">
          <div class="ui-inputgroup" style="position: relative">
            <input type="text" pInputText placeholder="请选择通知书附件"  disabled [(ngModel)]="detailData.file">
            <button pButton type="button" icon="pi pi-download" class="ui-button-warn" style="background: #F8F8F8;border: 1px solid #E0E3E7;border-left: 0;color: #007AD9" (click)="downFile(detailData.filePath)"></button>
          </div>
        </div>
      </div>
    </div>
    <p-footer>
      <button class="dialog-btn" (click)="showDetailDialog = false;">取消</button>
<!--      <button class="dialog-btn" (click)="sureEditRegularTestClick()">确认选择</button>-->
    </p-footer>
  </p-dialog>
</div>
